# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-lingua-franca
pkgver=0.4.8_alpha3
pkgrel=1
pkgdesc="Mycroft's multilingual text parsing and formatting library"
url="https://github.com/OpenVoiceOS/ovos-lingua-franca"
arch="noarch"
license="Apache-2.0"
depends="
	py3-colour
	py3-dateutil
	py3-quebra-frases
	py3-rapidfuzz
	py3-webcolors
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVoiceOS/ovos-lingua-franca/archive/refs/tags/V${pkgver//_alpha/a}.tar.gz"
builddir="$srcdir/ovos-lingua-franca-${pkgver//_alpha/a}"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
fce6e1aa17215110cc18c8d8a620aab63549492813dfdbe263ba7bc60748108476af7fb28d9b65dfcea46e009c469bb1410ffe752651649966fc3d4909d15d46  py3-lingua-franca-0.4.8_alpha3.tar.gz
"
